<template>
  <div class="swipe" :style="{background:colors[type],borderRadius:type?'33px':'0'}">
    <van-swipe style="height:66px" :autoplay="1500" loop :show-indicators="false" vertical>
      <van-swipe-item v-for="(item,index) in list" :key="index">
        <div class="f_r_sb_c swipeItem">
          <div class="f_r_m_c font-24">
            <img :src="item.img || item.user_avatar" alt="" />
            <span class="color_fff">{{item.name|| item.user_name}}</span>
          </div>
          <span class="color_FFC66D">{{item.good_title}}</span>
        </div>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  props: {
    type:{
      default:1,
      type:Number
    },
    list:{
      default:[],
      type:Array
    }
  },
  data(){
    return {
      colors:['rgba(0,0,0,0.2)','#a31e1b','#688FFF'],
    }
  }
};
</script>

<style scoped lang="scss">
.swipe {
  width: 100%;
  height: 66px;
  background: #a31e1b;
  
  padding: 0 20px;
  box-sizing: border-box;
  overflow: hidden;
  .swipeItem {
    width: 672px;
    height: 66px;
   img {
      width: 54px;
      height: 54px;
      border-radius: 50%;
      // background: blue;
      margin-right: 10px;
    }
  }
}
</style>
